package com.rightsidetech.mall.mapper;

import com.rightsidetech.mall.dto.request.SpecsPageReq;
import com.rightsidetech.mall.dto.response.SpecsPageResp;
import com.rightsidetech.mall.entity.MallSpecs;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MallSpecsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MallSpecs record);

    int insertSelective(MallSpecs record);

    MallSpecs selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MallSpecs record);

    int updateByPrimaryKey(MallSpecs record);

    Long selectCountBySpecsName(String specsName);

    Long selectCountByNameAndParentId(Map map);

    MallSpecs selectByParentId(Long parentId);

    Long selectCountByParentId(Long id);

    List<SpecsPageResp> selectPageList(SpecsPageReq req);
    Long selectPageList_COUNT(SpecsPageReq req);

    List<SpecsPageResp> selectValueList(Long id);

    Long checkSpecs(@Param("parentId") Long parentId, @Param("specs") String specs,@Param("id") Long id);

    int deleteByParentId(@Param("parentId")Long parentId);

    List<SpecsPageResp> selectAll();

    List<SpecsPageResp> getChild();

    List<MallSpecs> selectListByParentId(Long id);

    int isDeleteByIds(List<Long> list);

    Integer selectCountByIds(List<Long> list);
}